package com.mashiro.common.json;

import com.alibaba.fastjson2.JSON;

public class JsonUtil {

    public static String toJson(Object obj) {
        return JSON.toJSONString(obj);
    }

    public static <T> T toInstance(String jsonString, Class<T> clazz) {
        return JSON.parseObject(jsonString, clazz);
    }
}
